//
//  PersonalMsg.m
//  SDDataTest
//
//  Created by sodao on 12-9-20.
//  Copyright (c) 2012年 sodao. All rights reserved.
//

#import "PersonalMsg.h"



@implementation PersonalMsg
@synthesize groupPerson;
@synthesize sendStatus;
@synthesize msgContent;
@synthesize unReadCount;
@synthesize date;
@synthesize sendID,ID;


- (void)encodeWithCoder:(NSCoder *)aCoder{
    [super encodeWithCoder:aCoder];
    [aCoder encodeObject:self.groupPerson forKey:kEncodePersonalMsg_groupPerson];
    [aCoder encodeInt:self.sendStatus forKey:kEncodePersonalMsg_sendStatus];
    [aCoder encodeObject:self.msgContent forKey:kEncodePersonalMsg_msgContent];
    [aCoder encodeInt:self.unReadCount forKey:kEncodePersonalMsg_unReadCount];
    [aCoder encodeObject:self.date forKey:kEncodePersonalMsg_date];
    [aCoder encodeObject:self.sendID forKey:kEncodePersonalMsg_sendID];
    [aCoder encodeObject:self.ID forKey:kEncodePersonalMsg_ID];
}
- (id)initWithCoder:(NSCoder *)decoder {
    if (self = [super init]) {
        self.groupPerson = [decoder decodeObjectForKey:kEncodePersonalMsg_groupPerson];
        self.sendStatus = [decoder decodeIntForKey:kEncodePersonalMsg_sendStatus];
        self.msgContent = [decoder decodeObjectForKey:kEncodePersonalMsg_msgContent];
        self.unReadCount = [decoder decodeIntForKey:kEncodePersonalMsg_unReadCount];
        self.date = [decoder decodeObjectForKey:kEncodePersonalMsg_date];
        self.sendID = [decoder decodeObjectForKey:kEncodePersonalMsg_sendID];
        self.ID = [decoder decodeObjectForKey:kEncodePersonalMsg_ID];
    }
    return self;
}
-(id)initWithDictionary:(NSDictionary*)dictionary{
    self = [super initWithDictionary:dictionary];
    if (self) {
        
    }
    return self;
}
-(void)dealloc{
    [super dealloc];
    if(self.groupPerson)[self.groupPerson release];
    if(self.msgContent)[self.msgContent release];
    if(self.date)[self.date release];
    if(self.sendID)[self.sendID release];
    if(self.ID)[self.ID release];
}






@end
